package response

import (
	"chat/models"
)

type UserReq struct {
	Id          string `json:"id" bson:"_id"`
	UserName    string `json:"userName" bson:"userName"`
	HeadUrl     string `json:"headUrl" bson:"headUrl"`
	Description string `json:"description" bson:"description"`
}

type LoginReq struct {
	Token string `json:"token"`
}

func NewUserResp(user *models.User) *UserReq {
	return &UserReq{
		Id:          user.Id.String(),
		UserName:    user.UserName,
		HeadUrl:     user.HeadUrl,
		Description: user.Description,
	}
}
